package com.fjec.market.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fjec.common.protocol.JsonResult;
import com.fjec.market.entity.BizRating;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 013.商品评价表 服务类
 * </p>
 *
 * @author admin
 * @since 2020-09-22
 */
public interface IBizRatingService extends IService<BizRating> {

    /**
     * 保存子订单评价
     *
     * @param id
     * @param qualityRating
     * @param speedRating
     * @param logisticsRating
     * @param skuComment
     * @return
     */
    JsonResult subOrderRating(Long id, Integer qualityRating, Integer speedRating, Integer logisticsRating,
                              String skuComment, String picIds, String picUrls);

    List<Map<String, Object>> getPageBySpuId(Long spuId, Page page);


    /**
     * 获取所有商品Spu评分
     *
     * @return
     */
    List<Map<String, Object>> getSpuStarForSchedule();
}
